<html>
<head><meta charset="utf-8"><title>Time to rebuild the compiler? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html">Time to rebuild the compiler?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211741943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211741943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Emerson/jugglerchris <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211741943">(Sep 30 2020 at 10:43)</a>:</h4>
<p>Out of interest, how long would you expect it to take to run <code>x.py build --keep-stage 1</code> after a small change to something like <code>rustc_typeck</code> or <code>rustc_mir_build</code>?  Most of the time is spent on <code>rustc_driver</code> - I suspect the bottleneck is my spinning disk so I'm hoping that'll be improved by fitting an SSD.  I'm using a laptop which was a decent spec N years ago, but I guess not now - it's a 4-core/8 thread i7 Haswell.</p>



<a name="211742028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211742028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Emerson/jugglerchris <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211742028">(Sep 30 2020 at 10:44)</a>:</h4>
<p>Anyway, it currently takes ~10 minutes with a lot of <code>ld</code> blocked on I/O.</p>



<a name="211756867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211756867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211756867">(Sep 30 2020 at 13:14)</a>:</h4>
<p>You don't want keep-stage 1, it's not doing anything</p>



<a name="211756966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211756966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211756966">(Sep 30 2020 at 13:14)</a>:</h4>
<p>You're building the 'stage 0 artifacts', all that keeps is stage1 libstd which probably does need to be rebuilt</p>



<a name="211757022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211757022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211757022">(Sep 30 2020 at 13:15)</a>:</h4>
<p>What's your config.toml? Do you have incremental on?</p>



<a name="211763712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211763712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Emerson/jugglerchris <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211763712">(Sep 30 2020 at 13:58)</a>:</h4>
<p>The non-comment lines in my config.toml are:</p>
<div class="codehilite"><pre><span></span><code>[llvm]
assertions = true
link-jobs = 1
[build]
[install]
[rust]
debug = true
debuginfo-level-rustc = 2
incremental = true
</code></pre></div>



<a name="211763781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211763781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Emerson/jugglerchris <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211763781">(Sep 30 2020 at 13:59)</a>:</h4>
<p>I've enabled the rustc debug info (I'm using gdb to step around) which I guess doesn't help.</p>



<a name="211763914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211763914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Chris Emerson/jugglerchris <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211763914">(Sep 30 2020 at 14:00)</a>:</h4>
<p>I set <code>link-jobs = 1</code> to try to reduce instances of the OOM killer, but maybe I can remove that now that I've added some RAM.</p>



<a name="211771329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211771329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211771329">(Sep 30 2020 at 14:50)</a>:</h4>
<p>I'd remove debug-info=2, that's definitely it</p>



<a name="211771355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Time%20to%20rebuild%20the%20compiler%3F/near/211771355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Time.20to.20rebuild.20the.20compiler.3F.html#211771355">(Sep 30 2020 at 14:50)</a>:</h4>
<p>That generates several gigabytes of debuginfo</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>